package com.parktech.sun.domain.model.specialtopic;

import com.parktech.sun.domain.model.BaseEntity;
import com.parktech.sun.domain.model.ContentEntity;

import javax.persistence.*;
import java.util.List;

/**
 * User: Think
 * Date: 11-1-12
 * Time: 下午7:48
 */
@Entity
@DiscriminatorValue("80")
public class SpecialTopic extends ContentEntity {

    private String imageName;

    private List<SpecialTopicAttachment> attachmentList;

    private String src;

//    private SpecialTopicCategory category;

    private Integer position;

    public String getImageName() {
        return imageName;
    }

    public void setImageName(String imageName) {
        this.imageName = imageName;
    }

    @OneToMany(fetch = FetchType.LAZY, mappedBy = "specialTopic", cascade = CascadeType.ALL)
    public List<SpecialTopicAttachment> getAttachmentList() {
        return attachmentList;
    }

    public void setAttachmentList(List<SpecialTopicAttachment> attachmentList) {
        this.attachmentList = attachmentList;
    }
    public String getSrc() {
        return src;
    }

    public void setSrc(String src) {
        this.src = src;
    }

/*
    @ManyToOne
    public SpecialTopicCategory getCategory() {
        return category;
    }

    public void setCategory(SpecialTopicCategory category) {
        this.category = category;
    }

*/
    public Integer getPosition() {
        return position;
    }

    public void setPosition(Integer position) {
        this.position = position;
    }

    @Transient
    public String getLocation() {
        return "specialtopic";
    }
}
